import { createRouter, createWebHistory, RouteRecordRaw } from 'vue-router'
import StartView from '../views/CartPage.vue'
import OrderView from '../views/OrderPage.vue'
import Orderconfirm from '../views/OrderConfirmPage.vue'
import OrderDetail from '../views/OrderDetailPage.vue'
// 修改为命名导入


const routes: Array<RouteRecordRaw> = [
  {
    path: '/',
    name: 'start',
    component: StartView
  },
  {
    path: '/order',
    name: 'order',
    component: OrderView

  },
  {
    path: '/orderconfirm',
    name: 'orderconfirm',
    component: Orderconfirm
  },
  {
    path: '/orderdetail',
    name: 'orderdetail',
    component: OrderDetail

  },
  {
    path: '/help',
    name: 'help',
    component: () => import('@/pages/page1/views/HelpView.vue')
  },
  {
    path: '/myorders',
    name: 'myorders',
    component: () => import('../views/AllOrder.vue')
  }
]

const router = createRouter({
  history: createWebHistory('/page2'),
  routes
})

export default router
